﻿CREATE PROCEDURE [dbo].[proc_Customer_CallOnTongJi_TelViewCount]
(
	@DepartmentId int,
	@GenjinId int,
	@StartDate nvarchar(10),
	@EndDate nvarchar(10)
)
AS
	Select Count(ct.Id) From Customer_Track ct
	Where ct.DepartmentId=@DepartmentId and ct.GenJinId=@GenjinId and Convert(nchar(10),UpTime,120)>=@StartDate and Convert(nchar(10),UpTime,120)<=@EndDate
	RETURN
